﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/UserMasterPage.master" AutoEventWireup="true" CodeFile="CreateTicket.aspx.cs" Inherits="User_CreateTicket" MaintainScrollPositionOnPostback="true" %>

<%--<%@ Register Src="~/wuc/TicketProfileForUser.ascx" TagPrefix="wuc" TagName="TicketProfileForUser" %> --%>
<%--<%@ Register Src="~/wuc/TicketDetailForCreate.ascx" TagPrefix="wuc" TagName="TicketDetailForCreate" %>--%>



<asp:Content ID="Content0" ContentPlaceHolderID="PageTitle" runat="server">
    Create new ticket
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server">
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#Button1").click(function () {
                if (document.getElementById("hiddenDiv1").style.display == "none") {
                    $("#hiddenDiv1").show();
                }
                else {
                    $("#hiddenDiv1").hide();
                }
            });
            $("#Button2").click(function () {
                if (document.getElementById("hiddenDiv2").style.display == "none") {
                    $("#hiddenDiv2").show();
                }
                else {
                    $("#hiddenDiv2").hide();
                }
            });
            $("#Select1").click(function () {
                var txt = $("#<%=txtChargeableCode.ClientID %>").val();
                $("#<%=txtChargeable.ClientID %>").val(txt);
                $("#<%=txtChargeableCode.ClientID %>").val("");
                $("#hiddenDiv1").hide();
            });
            $("#Select2").click(function () {
                var txt = $("#<%=txtProfileCode.ClientID %>").val();
                $("#<%=txtProfiltCentre.ClientID %>").val(txt);
                $("#<%=txtProfileCode.ClientID %>").val("");
                $("#hiddenDiv2").hide();
            });


            $("#<%=txtChargeableCode.ClientID%>").kpmgAutoCompletedV2(
                {
                    'format': 'Description',
                    'itemFormat': '[ChargeableCode] Description',
                    'populatingControls': [
                        { 'id': 'MainContentPlaceHolder_txtIOCodeNo', 'format': 'ChargeableCode'}],
                    'webService': { 'serviceURL': '../services/ClientService.asmx/ListInternalOrder', 'parameter': 'orderOrdec' }
                }
            );
            $("#<%=txtProfileCode.ClientID%>").kpmgAutoCompletedV2(
                {
                    'format': 'DeptName',
                    'itemFormat': '[DeptCode] DeptName',
                    'populatingControls': [
                        { 'id': 'MainContentPlaceHolder_txtOtherProfitCenterNo', 'format': 'DeptCode'}],
                    'webService': { 'serviceURL': '../services/ClientService.asmx/ListProfitCentre', 'parameter': 'condition' }
                }
            );


        });
    </script>


    <!--Ticket Profile, Detail-->
    <%-- <wuc:TicketProfileForUser runat="server" ID="TicketProfileForUser" />--%>
   <%-- <wuc:TicketDetailForCreate runat="server" ID="TicketDetailForCreate" />--%>
    <!-- Attachments -->
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
            <td class="TurquoisePodHeader">Ticket profile
            </td>
        </tr>
        <tr>
            <td style="line-height:5px;">&nbsp;</td>
        </tr>
        <tr>
            <td>
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr>
                        <td style="width:20%;padding-bottom:20px;" class="FormLabel2013">Profile type</td>
                        <td style="width:80%"><asp:Label ID="lblProfileType" runat="server" /></td>
                    </tr>
                    <tr>
                        <td style="padding-bottom:20px;" class="FormLabel2013">Profile description</td>
                        <td><asp:Label ID="lblProfileDes" runat="server" /></td>
                    </tr>
                    <tr>
                        <td style="line-height:15px;"> &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="padding-bottom:20px;" class="FormLabel2013">Internal order</td>
                        <td>
                            <asp:TextBox ID="txtChargeable" runat="server" ReadOnly="true" CssClass="FormTextField" Width="200px" />
                            <input type="button" id="Button1" value="Select other chargeable" class="FormButton2013" /><br />
                            <div style="display:none; padding-bottom:10px;" id="hiddenDiv1">
                            <%--<div>--%>
                                Internal order code: <asp:TextBox ID="txtChargeableCode" runat="server" Width="200px" />
                                <asp:HiddenField ID="txtIOCodeNo" runat="server" />
                                <input type="button" id="Select1" value="Select" class="FormButton2013" />
                            </div>
                            Please do not change this unless specified by service provider.
                        </td>
                    </tr>
                    <tr>
                        <td style="line-height:15px;"> &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="padding-bottom:20px;" class="FormLabel2013">Charge profilt centre</td>
                        <td>
                            <asp:TextBox ID="txtProfiltCentre" runat="server" ReadOnly="true" CssClass="FormTextField" Width="200px" />
                            <input type="button" id="Button2" value="Select other profit centre" class="FormButton2013" /><br />
                            <div style="display:none; padding-bottom:10px;" id="hiddenDiv2">
                                Profile centre code:<asp:TextBox ID="txtProfileCode" runat="server" Width="150px" />
                                <asp:HiddenField ID="txtOtherProfitCenterNo" runat="server" />
                                <input type="button" id="Select2" value="Select" class="FormButton2013" />
                            </div>
                            Please do not change this unless specified by service provider.
                        </td>
                    </tr>
                
                    <tr>
                        <td style="line-height:15px;"> &nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>

    </table>


    <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
            <td class="TurquoisePodHeader">Attachments 
            </td>
        </tr>
        <tr><td style="line-height:5px;">&nbsp;</td></tr>
        <tr>
            <td>
                <asp:Button ID="btnOpenFolder" runat="server" CssClass="FormButton2013" CommandArgument="DataNeeded"
                    OnClick="btnOpenFolder_Click" Enabled="false" Text="Supporting document folder" />
            </td>
        </tr>
    </table>
    <hr class="divideLine" />
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
            <td colspan="2" style="padding-bottom: 10px">
                If supporting documents are ready for attachment, click "Save draft" to create a supporting documents folder. After uploading the supporting documents, click "Submit" to send ticket for Processing Team Planning<br />
                If supporting documents are not yet available, "Submit" your ticket now and attach the supporting documents later when you want the Processing Team to begin working on this ticket.
            </td>
        </tr>
        <tr>
            <td style="width: 50%">
                <asp:Button runat="server" CssClass="FormButton2013" ID="btnSaveDraft" OnClick="btnSaveDraft_Click" Text="Save draft" />
                <asp:Button runat="server" CssClass="FormButton2013" ID="btnSubmit" OnClick="btnSubmit_Click" Text="Submit" />
                <asp:Button runat="server" CssClass="FormButton2013" ID="btnReset" OnClick="btnReset_Click" Text="Reset" />
            </td>
            <td style="text-align: right">
                <asp:Button ID="btnWithDraw" runat="server" CssClass="FormButtonRed2013" Visible="false"
                    OnClientClick="return confirm('Confirm to withdraw the ticket?');" OnClick="btnWithDraw_Click" />
            </td>
        </tr>
    </table>
    <div>
        <asp:Label ID="lblScript" runat="server" CssClass="FormAlertText"></asp:Label>
        <asp:Label ID="lblResult" runat="server" CssClass="FormAlertText"></asp:Label>
    </div>
</asp:Content>

